More problems
[andmenj-acm.git] / 11296 - Counting Solutions of an Integer Equation / p11296.cpp
blobe9fd1b2d48ce71c5a0a2171fe12e02193e0f5d38
1 #include <iostream>
2 using namespace std;
3 int main(){
4 int n;
5 while (cin >> n){
6 long long s=0;
7 if (n % 2 == 1) --n;
8 while (n >= 0){
9 s += (n/2)+1;
10 n -= 2;
12 cout << s << endl;
14 return 0;